# coding: utf-8
'''
Created on 25 avr. 2011

@author: shin
'''
import unittest
from business.ElementDeplacable import ElementDeplacable
from stub.DaoElement import DaoElement

class Test(unittest.TestCase):

    def setUp(self):
        self.elementDeplacable =\
            ElementDeplacable(DaoElement("Guerrier", "Nain"))

    def tearDown(self):
        del self.elementDeplacable

    def test_Init_PointDeVie(self):
        self.assertEqual(self.elementDeplacable.pointDeVie, 80)
        
    def test_Init_Constitution(self):
        self.assertEqual(self.elementDeplacable.constitution, 8)
        
    def test_Init_Taille(self):
        self.assertEqual(self.elementDeplacable.taille, 1.2)
        
    def test_Init_Degats(self):
        self.assertEqual(self.elementDeplacable.degats, 5)
        
    def test_Init_Franchissable(self):
        self.assertEqual(self.elementDeplacable.franchissable, False)

    def test_RecoitCoup(self):
        self.assertEqual(self.elementDeplacable.calculRecoitCoup(10, "physique"), 10)

if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()
